package com.example.myapplication.ui.home

import android.annotation.SuppressLint
import android.os.Bundle
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import com.example.myapplication.databinding.ActivityAttracttotdgeviewBinding

class Edgeattractingview : AppCompatActivity() {

    private lateinit var binding: ActivityAttracttotdgeviewBinding


    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivityAttracttotdgeviewBinding.inflate(layoutInflater)
        setContentView(binding.root)

        initView()
    }



    @SuppressLint("UseCompatLoadingForDrawables")
    private fun initView() {
        binding.draggableView.setAttractToLeftEdge(false)

        binding.imageButton.setOnClickListener{
            val rootView = findViewById<ViewGroup>(android.R.id.content)

            // 基本使用
            SnackToast.show(binding.imageButton, "这是一条普通提示")
        }
    }

}
